#ifndef DATABASE_H
#define DATABASE_H
#include "util/define.h"
#include "QDateTime"
#include "config/common.h"
class DataBase
{
public:
    DataBase();
    virtual ~DataBase();
    DataBase(QString fileName);
    DataBase(QString fileName,DATAFORMAT dataFormat);
public:
    virtual QDateTime getStartTime();
    virtual QDateTime getStartTime(QString fileName);
    virtual int *getData(LONG  start ,LONG  end,DATAFORMAT dataformat =0 ,int pianyiPoint =0 );
    virtual LONG getPointNumber();
    virtual LONG getFileLength();
    virtual int getFreq(); 
    virtual void setFreq(int freq);
    virtual QList< QVector <QPointF> > get_Data(LONG  pre,LONG  end,int acc);
    virtual QVector<QPointF> get_PSegy_Data(LONG preNum, LONG lastNum);
    virtual int getPianyi();
    virtual int getTotalStaticApplied();

public:
    QString fileName;
    DATAFORMAT dataFormat;
    int freq;
    Common *common;
    double getAbsmax();
    long getMax();
    long getMin();
protected:
    long max ;
    long  min ;
    double  ave;
    double absmax;
    double absmin;
    int acc;
    LONG pointsNum;

};

#endif // DATABASE_H
